function swiper() {
  new Swiper('.swiper', {
    autoplay: {
      delay: 1000,//1秒切换一次
    },
    effect: 'cube',
    // 如果需要分页器
    pagination: {
      el: '.swiper-pagination',
    },

    // 如果需要前进后退按钮
    navigation: {
      nextEl: '.swiper-button-next',
      prevEl: '.swiper-button-prev',
    },
  })
}
swiper()